<?php
defined( 'ABSPATH' ) || exit;

get_header();
?>
	<div id="page-content" class="case-page">
		<div id="container">
			<!-- These are our grid blocks -->
			<?php 

			$args  = array(
				'cat' => $cat,
				'posts_per_page'    => 16,
				'paged'             => $paged
			); 
			query_posts($args);
			if (have_posts() ) {
				while (have_posts() ) {
					the_post();
					$category = get_the_category();
			?>
			<div class="item animate-box">
				<a class="example-image-link" href="<?php the_post_thumbnail_url(); ?>" data-lightbox="example-set" data-title="点击图片右边切换下张图片"><img class="example-image" src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title();?>"/></a>
				<div class="content-item">
					<span class="time"><a class="btn btn-<?php echo $category[0]->category_nicename;?>"><?php echo $category[0]->name;?></a>&nbsp<?php the_time('Y-m-d');?></span>
					<h3 class="title-item"><a href="#"><?php the_title();?></a></h3>
					<p class="info"><?php the_excerpt();?></p>
				</div>
			</div>
			<?php
				}
			}
			?>
		</div>
		<?php
		get_template_part( 'content', 'paging' );
		?>
	</div>

<?php
get_footer();
?>